-
Notifications
You must be signed in to change notification settings - Fork 5
Implemented Containerization of the Lyra Webapp #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d09ed15
to
71486b6
Compare
71486b6
to
0eaa070
Compare
Copying over @henrycatalinismith 's PR description here to not override it: Not fully working yet but lots of annoying obstacles cleared so far. Here's the error message as of the end of the day.
|
4801da3
to
7c8e25b
Compare
790557d
to
ed66bc6
Compare
there's still some issue with the unit tests that needs to be addressed |
Also i just noticed that the publishing of translation changes is not working at the moment. Error while creating pull request: Error: fatal: ../zetkin-fork-for-lyra/src/locale/da.yml: '../zetkin-fork-for-lyra/src/locale/da.yml' is outside repository at '/app/zetkin-fork-for-lyra' This is some weird issue with the paths that are being used throughout the webapp. What do you think? |
That looks like a bug in Lyra. If I recall correctly, we convert to absolute paths pretty early after reading I'm not sure exactly what you are suggesting with configuring all paths in a central location. Our configuration file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed all the changes and leave my notes here. I haven't done any testing yet.
I haven't concluded what needs fixing and what can be deferred to later, except for the one about copying config
into the container image. That one seems like a serious issue to me.
6d4350b
to
38613d7
Compare
dc564fe
to
23d3297
Compare
Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
since it contains the github token which should not be inside of the image Signed-off-by: Alexander Schreiner <[email protected]>
- improved logging - introduced dynamic .yml and .yaml support for configuration - added host projects config - only copying webapp folder into builder stage - bumping up to node version 23 - adding git username/password to docker env variables - adjusted README Signed-off-by: Alexander Schreiner <[email protected]>
23d3297
to
83f84ef
Compare
Signed-off-by: Alexander Schreiner <[email protected]>
7dff829
to
f497ccb
Compare
package-lock.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My npm 10.9.2 cannot reproduce the package-lock.json of 607027a from the corresponding package.json. That doesn't mean its wrong, but I think we need to understand why it's different. What tool did you use and how?
@@ -21,7 +21,7 @@ | |||
"@mui/material-nextjs": "^5.16.8", | |||
"@mui/x-tree-view": "^7.23.0", | |||
"@octokit/rest": "^20.1.1", | |||
"next": "14.2.15", | |||
"next": "^14.2.29", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
|
||
```bash | ||
npm run build | ||
node webapp/.next/standalone/lyra/webapp/server.js --check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag --check
tells Node to check the script's syntax without executing it. Does this really help to catch missing dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no - it doesn't help catch missing dependencies. You have any idea how we could achieve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think we'll just have to rely on manual testing. Now that we are using outputFileTracingRoot, we're following their instructions and the risk of they breaking it in a new version of Next is much lower.
I don't think we need any special note to developers to do careful manual testing when they upgrade Next. A developer will do some testing anyway naturally and that is sufficient.
Signed-off-by: Alexander Schreiner <[email protected]>
… a flag to node, and not to server.js Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
…projects to readme Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
…projects Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
Signed-off-by: Alexander Schreiner <[email protected]>
…ed because we only need to support x86 arch Signed-off-by: Alexander Schreiner <[email protected]>
70a4099
to
255964f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- '*.*.*' | ||
- '*.*.*-rc.*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern *.*.*-rc.*
is already covered by the pattern *.*.*
which allows any string as long it contains to dots.
Let's remove the second pattern or rewrite this to more specific patterns in a separate issue #201 rather than delaying merge futher. You can resolve this conversation when you have read it.
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version 3 of actions/checkout has not been maintained for a while. I don't think there's any known severe issue with using v3 so we can update to v4 in a separate merge request. I created a separate issue #202 to track that instead of delaying merge further. You can resolve this conversation when you have read it.
uses: docker/setup-docker-action@v4 | ||
|
||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version 2 of docker/login-action is not maintained. I created a separate issue #202 for updating to v3 instead of delaying this merge request further. You can resolve this conversation when you have read it.
We are using GitHub-hosted runners on Linux so Docker is already up and running. It is not necessary to use docker/setup-docker-action https://github.com/docker/setup-docker-action/blob/efe6ba76e30de04f1a84d4aa6ea0d802d73b31b9/README.md?plain=1#L12-L17. https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#tools
Reformat with prettier
Remove docker/setup-docker-action
omfg |
Description
Added containerization to the lyra project to be able to run the whole thing inside of a container.
Read through the Docker setup section within the
README.md
for more details on how this works.